<?php

namespace Database\Factories\Category;

use App\Models\Category\Category;
use Illuminate\Database\Eloquent\Factories\Factory;

class CategoryFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Category::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'admin_id' => 10,
            'nickname' => $this->faker->text(5),
            'image' => 'https://placeimg.com/640/480/any',
            'category_group_id' => $this->faker->randomElement([4, 5]),
            'pid' => 0,
            'level' => 1,
            'status' => $this->faker->randomElement([0, 1]),
            'created_at' => $this->faker->time('Y-m-d H:i:s', 'now'),
            'updated_at' => $this->faker->time('Y-m-d H:i:s', 'now'),
        ];
    }
}
